<template>
    <div class="component2">
      <div class="title">近期AI教学资料</div>
      <div class="content">
        <div v-for="(record, index) in sourceHistory" :key="index">{{ record }}</div>
        <div class="more">查看更多</div>
      </div>
    </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
const sourceHistory = ref<string[]>([]);
onMounted(()=>{
  sourceHistory.value = JSON.parse(localStorage.getItem('sourceHistory') || '[]');
})
</script>

<style scoped lang="less">
@import url('@/views/recent-source/components/component2/index.less');
</style>